home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-11 | 8.2 KB | 470 lines | [TEXT/MPS ] |
- ;
- ; File: Drag.a
- ;
- ; Copyright: © 1984-1994 by Apple Computer, Inc.
- ; All rights reserved.
- ;
- ; Version: Universal Interfaces 2.0a3 ETO #16, MPW prerelease. Friday, November 11, 1994.
- ;
- ; Bugs?: If you find a problem with this file, send the file and version
- ; information (from above) and the problem description to:
- ;
- ; Internet: apple.bugs@applelink.apple.com
- ; AppleLink: APPLE.BUGS
- ;
- ;
-
- IF &TYPE('__DRAG__') = 'UNDEFINED' THEN
- __DRAG__ SET 1
-
-
- IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
- include 'AppleEvents.a'
- ENDIF
- ; include 'Errors.a' ;
- ; include 'ConditionalMacros.a' ;
- ; include 'Types.a' ;
- ; include 'Memory.a' ;
- ; include 'MixedMode.a' ;
- ; include 'OSUtils.a' ;
- ; include 'Events.a' ;
- ; include 'Quickdraw.a' ;
- ; include 'QuickdrawText.a' ;
- ; include 'EPPC.a' ;
- ; include 'PPCToolbox.a' ;
- ; include 'AppleTalk.a' ;
- ; include 'Processes.a' ;
- ; include 'Files.a' ;
- ; include 'Notification.a' ;
-
- IF &TYPE('__TEXTEDIT__') = 'UNDEFINED' THEN
- include 'TextEdit.a'
- ENDIF
-
- ; Flavor Flags
- flavorSenderOnly EQU $00000001 ; flavor is available to sender only
- flavorSenderTranslated EQU $00000002 ; flavor is translated by sender
- flavorNotSaved EQU $00000004 ; flavor should not be saved
- flavorSystemTranslated EQU $00000100 ; flavor is translated by system
-
- ; Drag Attributes
- dragHasLeftSenderWindow EQU $00000001 ; drag has left the source window since TrackDrag
- dragInsideSenderApplication EQU $00000002 ; drag is occurring within the sender application
- dragInsideSenderWindow EQU $00000004 ; drag is occurring within the sender window
-
- ; Special Flavor Types
- flavorTypeHFS EQU 'hfs ' ; flavor type for HFS data
- flavorTypePromiseHFS EQU 'phfs' ; flavor type for promised HFS data
- flavorTypeDirectory EQU 'diry'
-
- ; Drag Tracking Handler Messages
- dragTrackingEnterHandler EQU 1 ; drag has entered handler
- dragTrackingEnterWindow EQU 2 ; drag has entered window
- dragTrackingInWindow EQU 3 ; drag is moving within window
- dragTrackingLeaveWindow EQU 4 ; drag has exited window
- dragTrackingLeaveHandler EQU 5 ; drag has exited handler
-
- ; Drag Drawing Procedure Messages
- dragRegionBegin EQU 1 ; initialize drawing
- dragRegionDraw EQU 2 ; draw drag feedback
- dragRegionHide EQU 3 ; hide drag feedback
- dragRegionIdle EQU 4 ; drag feedback idle time
- dragRegionEnd EQU 5 ; end of drawing
-
- ; Zoom Acceleration
- zoomNoAcceleration EQU 0 ; use linear interpolation
- zoomAccelerate EQU 1 ; ramp up step size
- zoomDecelerate EQU 2 ; ramp down step size
-
- ; Drag Manager Data Types
- ; HFS Flavors
- HFSFlavor RECORD 0
- fileType ds.l 1 ; file type
- fileCreator ds.l 1 ; file creator
- fdFlags ds.w 1 ; Finder flags
- fileSpec ds FSSpec ; file system specification
- sizeof EQU 80
- ENDR
-
- PromiseHFSFlavor RECORD 0
- fileType ds.l 1 ; file type
- fileCreator ds.l 1 ; file creator
- fdFlags ds.w 1 ; Finder flags
- promisedFlavor ds.l 1 ; promised flavor containing an FSSpec
- sizeof EQU 14
- ENDR
-
- ; Application-Defined Drag Handler Routines
- ; Application-Defined Routines
- ; Drag Manager Routines
- ; Installing and Removing Drag Handlers
- IF GENERATING68K THEN
- Macro
- _InstallTrackingHandler
- moveq #1,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT InstallTrackingHandler
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _InstallReceiveHandler
- moveq #2,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT InstallReceiveHandler
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _RemoveTrackingHandler
- moveq #3,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT RemoveTrackingHandler
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _RemoveReceiveHandler
- moveq #4,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT RemoveReceiveHandler
- ENDIF
-
- ; Creating and Disposing Drag References
- IF GENERATING68K THEN
- Macro
- _NewDrag
- moveq #5,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT NewDrag
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _DisposeDrag
- moveq #6,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT DisposeDrag
- ENDIF
-
- ; Adding Drag Item Flavors
- IF GENERATING68K THEN
- Macro
- _AddDragItemFlavor
- moveq #7,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT AddDragItemFlavor
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SetDragItemFlavorData
- moveq #9,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT SetDragItemFlavorData
- ENDIF
-
- ; Providing Drag Callback Procedures
- IF GENERATING68K THEN
- Macro
- _SetDragSendProc
- moveq #10,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT SetDragSendProc
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SetDragInputProc
- moveq #11,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT SetDragInputProc
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SetDragDrawingProc
- moveq #12,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT SetDragDrawingProc
- ENDIF
-
- ; Performing a Drag
- IF GENERATING68K THEN
- Macro
- _TrackDrag
- moveq #13,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT TrackDrag
- ENDIF
-
- ; Getting Drag Item Information
- IF GENERATING68K THEN
- Macro
- _CountDragItems
- moveq #14,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT CountDragItems
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetDragItemReferenceNumber
- moveq #15,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT GetDragItemReferenceNumber
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _CountDragItemFlavors
- moveq #16,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT CountDragItemFlavors
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetFlavorType
- moveq #17,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT GetFlavorType
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetFlavorFlags
- moveq #18,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT GetFlavorFlags
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetFlavorDataSize
- moveq #19,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT GetFlavorDataSize
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetFlavorData
- moveq #20,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT GetFlavorData
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetDragItemBounds
- moveq #21,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT GetDragItemBounds
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SetDragItemBounds
- moveq #22,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT SetDragItemBounds
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetDropLocation
- moveq #23,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT GetDropLocation
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SetDropLocation
- moveq #24,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT SetDropLocation
- ENDIF
-
- ; Getting Information About a Drag
- IF GENERATING68K THEN
- Macro
- _GetDragAttributes
- moveq #25,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT GetDragAttributes
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetDragMouse
- moveq #26,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT GetDragMouse
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _SetDragMouse
- moveq #27,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT SetDragMouse
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetDragOrigin
- moveq #28,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT GetDragOrigin
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _GetDragModifiers
- moveq #29,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT GetDragModifiers
- ENDIF
-
- ; Drag Highlighting
- IF GENERATING68K THEN
- Macro
- _ShowDragHilite
- moveq #30,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT ShowDragHilite
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _HideDragHilite
- moveq #31,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT HideDragHilite
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _DragPreScroll
- moveq #32,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT DragPreScroll
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _DragPostScroll
- moveq #33,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT DragPostScroll
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _UpdateDragHilite
- moveq #34,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT UpdateDragHilite
- ENDIF
-
- ; Drag Manager Utilities
- IF GENERATING68K THEN
- Macro
- _WaitMouseMoved
- moveq #35,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT WaitMouseMoved
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _ZoomRects
- moveq #36,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT ZoomRects
- ENDIF
-
- IF GENERATING68K THEN
- Macro
- _ZoomRegion
- moveq #37,d0
- dc.w $ABED
- EndM
- ELSE
- IMPORT ZoomRegion
- ENDIF
-
- ENDIF ; __DRAG__
-